<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="../../assets/ico/favicon.png">

        <title>UpaoCommons 1.0</title>

        <!-- Bootstrap core CSS -->
        <link href="../../dist/css/bootstrap.css" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="jumbotron.css" rel="stylesheet"/>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="../../assets/js/html5shiv.js"></script>
          <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->
        <script type="text/javascript" src="scripts/ddsmoothmenu.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
        <script>
            $(document).ready(function() {
                $("#datepicker").datepicker();
                $('#datepicker').datepicker('option', {dateFormat: 'dd/mm/yy'});
                // $("#startDate").datepicker({dateFormat: 'dd/mm/yy'});
            });
        </script>
        
        <script>
            function check()
            {
                if (document.formulario.nombre.value == '')
                {
                    alert("Debe ingresar un nombre. Gracias");
                    document.forms[0].nom.focus();
                    return false;                  
                }
            }
        </script>

    </head>

    <body>
        <% String idProducto = String.valueOf(request.getParameter("idProducto"));
            String nombres = "JOSE";
        %>
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">UPAO COMMONS</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="../index.jsp">Inicio</a></li>
                        <li><a href="#about">Nosotros</a></li>
                        <li><a href="#contact">Contacto</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Servicios <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li class="divider"></li>
                                <li class="dropdown-header">Nav header</li>
                                <li><a href="#">Separated link</a></li>
                                <li><a href="#">One more separated link</a></li>
                            </ul>
                        </li>
                    </ul>
                    <form class="navbar-form navbar-right" method="post" action="/user">
                        <div class="form-group">
                            <input type="text" readonly="" placeholder="Correo" value="Bienvenido(a): <%=nombres%>" class="form-control"/>
                        </div>
                        <input type="hidden" name="action" value="logOutUser"/>
                        <button type="submit" class="btn btn-success">Cerrar Sesión</button>
                    </form>
                </div><!--/.navbar-collapse -->
            </div>
        </div>

        <%--Cuerpo del formulario--%>
        <br>
        <br>
        <br>
        <br>
        <br>
        
        <div style="width: 100%;">
            <div style="float: left; margin-left: 100px; width: 150px; margin-right: 20px" >
                <ul class="nav nav-pills nav-stacked">
                    <li><a href="V_ListadoProductos.jsp">Inicio</a></li>
                    <li><a href="V_ListadoProductos.jsp">Productos</a></li>
                    <li class="active"><a href="V_ListReq.jsp">Requerimientos</a></li>
                </ul>
            </div>
        <div class="jumbotron" style="float: left; width: 800px; margin-left: 100px" >
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading"><b>Nuevo Requerimiento (Producto: UPAO COMMONS - v1.0)</b></div>
                <div class="panel-body">
                    <form name="formulario" action="/requerimiento" method="post" onsubmit="return check();">
                        <input type="hidden" name="idProducto" value="<%= idProducto %>" >
                        <table style="font-size: smaller">
                            
                            <tr>
                                <th>
                                    <label>Requerimiento:</label>
                                </th>
                                <th><input name="nombre" type="text" placeholder="Ingrese Nombre del Requerimiento" class="form-control" size="50"><label style="color: red">(*)</label></th>
                            </tr>
                            <tr>
                                <th>
                                    <label>Fecha de Registro:</label>
                                </th>
                                <th><input name="fecha" type="text" placeholder="Seleccione Fecha de Registro" class="form-control" size="50"></th>
                            </tr>                            
                            <tr>
                                <th>
                                    <label>Prioridad:</label>
                                </th>
                                <th>
                                    <select style="width: auto" class="combobox input-large" name="prioridad">
                                        <option value="1">1</option>
                                        <option value="2">2</option>
                                        <option value="3">3</option>
                                        <option value="4">4</option>
                                        <option value="5">5</option>
                                    </select>
                                </th>
                            </tr>
                            <tr>
                                <th>
                                    <label>Descripción:</label>
                                </th>
                                <th>
                                    <textarea name="descripcion" rows="5" cols="50"></textarea>
                                </th>
                            </tr>
                        </table>
                        <input type="hidden" name="action" value="new">
                        <center><input class="btn btn-primary btn-success" type="submit" value="Registrar Requerimiento"></center>
                    </form>
                </div>
            </div>

        </div>
        </div>
    </body>
</html>